package test.driver;

import org.testng.IRetryAnalyzer;
import org.testng.ITestResult;

/**
 * 用例重试机制
 * @author 徐东名
 *
 */
public class Retry implements IRetryAnalyzer {
	
    private int retryCount        = 0;  //初始
    public static int retryMax 		  = 0;

    /**
     * 用例失败重试
     */
    @Override
    public boolean retry(ITestResult result) {
        if (retryCount < retryMax) {
            retryCount++;
            return true;
        }
        return false;
    }
}